import React, {Component, PropTypes} from 'react'
import render from 'react-dom'
import {bindActionCreators} from 'redux'
import {connect} from 'react-redux'
import {Link} from 'react-router'

class home extends Component {
    componentDidMount() {
    }

    render() {
        console.log('home props：',this.props)
        
        return (
            <div>
                找不到页面？返回<Link to={'/home'}>首页</Link>
            </div>
        )
    }
}

const contextTypes = {
    router: PropTypes.object.isRequired,
    store: PropTypes.object.isRequired
}

home.contextTypes = contextTypes;

function mapStateToProps(state) {
  return {
  }
}
//将action的所有方法绑定到props上
function mapDispatchToProps(dispatch) {
  return {
      actions: bindActionCreators({
      }, dispatch)
  }
}

//通过react-redux提供的connect方法将我们需要的state中的数据和actions中的方法绑定到props上
export default connect(mapStateToProps, mapDispatchToProps)(home)



